// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_fk.p_a;

import android.net.Uri;
import com.nnee.p_c.cls_p;
import com.nnee.p_i.cls_c;
import com.nnee.p_i.cls_c;
import com.nnee.p_pr.p_a.cls_r;
import java.io.*;
import java.net.URLEncoder;
import java.util.*;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;

// Referenced classes of package com.nnee.p_fk.a:
//            b, h, f, c

public class cls_m
    implements cls_p
{

    public cls_m(String s1)
    {
        this(s1, cls_b.aGET);
    }

    public cls_m(String s1, cls_b b1)
    {
        if(s1 == null || s1.length() == 0)
        {
            throw new IllegalArgumentException("url");
        } else
        {
            n = b1;
            o = s1;
            p = s1;
            m = C();
            return;
        }
    }

    /**
     * @deprecated Method C is deprecated
     */

    public static int C()
    {
        
        int i1;
        if(a >= 32767)
            a = 0;
        i1 = 1 + a;
        a = i1;
        
         
        return i1;
         
    }

    private void a(int i1, boolean flag)
    {
        if(flag)
            B = i1 | B;
        else
            B = B & ~i1;
    }

    private boolean a(int i1)
    {
        boolean flag;
        if((i1 & B) != 0)
            flag = true;
        else
            flag = false;
        return flag;
    }

    public boolean A()
    {
        return a(128);
    }

    public boolean B()
    {
        return a(64);
    }

    public cls_c D()
    {
        return F;
    }

    public cls_h a(HttpResponse httpresponse)
    {
        return null;
    }

    public void a()
    {
        if(t != null)
        {
            StringBuilder stringbuilder = new StringBuilder(o);
            if(t.size() > 0)
            {
                stringbuilder.append('?');
                cls_h h1;
                for(Iterator iterator = t.iterator(); iterator.hasNext(); stringbuilder.append(URLEncoder.encode(h1.a())).append('=').append(URLEncoder.encode(h1.b())).append('&'))
                    h1 = (cls_h)iterator.next();

                stringbuilder.deleteCharAt(-1 + stringbuilder.length());
            }
            p = stringbuilder.toString();
        }
    }

    public void a(com.nnee.p_fk.p_a.cls_c c1)
    {
        r = c1;
    }

    public void a(cls_c c1)
    {
        F = c1;
    }

    public void a(String s1)
    {
        z = s1;
    }

    public void a(String s1, String s2)
    {
        if(s1 != null && s2 != null)
        {
            if(t == null)
                t = new LinkedList();
            t.add(new cls_h(s1, s2));
        }
    }

    public void a(HttpEntity httpentity)
    {
        q = httpentity;
    }

    public boolean a(Object obj)
    {
        boolean flag = false;
        if(e() && obj != null && (obj instanceof cls_m))
        {
            cls_m m1 = (cls_m)obj;
            if(m1.e() && A == m1.A && B() == m1.B() && o() == m1.o() && j() == m1.j() && b().equals(m1.b()) && l().equals(m1.l()))
                flag = true;
        }
        return flag;
    }

    public String b()
    {
        return p;
    }

    public void b(int i1)
    {
        v = i1;
    }

    public void b(String s1)
    {
        D = s1;
    }

    public void b(String s1, String s2)
    {
        if(s1 != null && s1.length() != 0 && s2 != null)
        {
            if(s == null)
                s = new LinkedList();
            s.add(new cls_h(s1, s2));
        }
    }

    public void c(int i1)
    {
        E = i1;
    }

    public void c(boolean flag)
    {
        a(2, flag);
    }

    public void d(int i1)
    {
        y = i1;
    }

    public void d(boolean flag)
    {
        a(16, flag);
    }

    public boolean d()
    {
        return false;
    }

    public void e(int i1)
    {
        A = i1;
    }

    public void e(boolean flag)
    {
        a(8, flag);
    }

    public boolean e()
    {
        return a(2);
    }

    public int f()
    {
        return v;
    }

    public void f(int i1)
    {
        w = i1;
    }

    public void f(boolean flag)
    {
        a(4, flag);
    }

    public int g()
    {
        return w;
    }

    public void g(boolean flag)
    {
        a(32, flag);
    }

    public int h()
    {
        return E;
    }

    public void h(boolean flag)
    {
        a(128, flag);
    }

    public int i()
    {
        return m;
    }

    public void i(boolean flag)
    {
        a(64, flag);
    }

    public int j()
    {
        return y;
    }

    protected List k()
    {
        return t;
    }

    protected String l()
    {
        String s1;
        if(z == null)
            s1 = "";
        else
            s1 = z;
        return s1;
    }

    public com.nnee.p_fk.p_a.cls_c m()
    {
        return r;
    }

    public String n()
    {
        return Uri.parse(o).getHost();
    }

    public cls_b o()
    {
        return n;
    }

    public HttpEntity p()
    {
        return q;
    }

    public long q()
    {
        return u;
    }

    public void r()
    {
        a(1, true);
    }

    public List s()
    {
        return s;
    }

    public String t()
    {
        return D;
    }

    public boolean u()
    {
        return a(1);
    }

    public String v()
    {
        if(!w() || C != null) {} else {
        String s1 = null;
        switch(cls_f.a[o().ordinal()])
        {
   
        	case 1:
        	case 2:
        	case 3:
        		s1 = com.nnee.p_pr.p_a.cls_r.a((new StringBuilder()).append(b()).append(l()).toString());
        		break;
        	case 4:
        	case 5:
        	case 6:
        		String s2;
                ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
                if(q != null)
					try {
						q.writeTo(bytearrayoutputstream);
					} catch (IOException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
			try {
				bytearrayoutputstream.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
                ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(bytearrayoutputstream.toByteArray());
                s2 = com.nnee.p_pr.p_a.cls_r.a((new StringBuilder()).append(b()).append(l()).append(com.nnee.p_pr.p_a.cls_e.a(bytearrayinputstream)).toString());
                s1 = s2;
              break;
            default:
            	
            	break;
        	
        }
        C = s1;
        }
        return C;
         
    }

    public boolean w()
    {
        return a(16);
    }

    public boolean x()
    {
        return a(8);
    }

    public boolean y()
    {
        return a(4);
    }

    public boolean z()
    {
        return a(32);
    }

    private static int a = 0;
    private static final int b = 1;
    private static final int c = 2;
    private static final int d = 4;
    private static final int e = 8;
    private static final int f = 16;
    private static final int g = 32;
    private static final int h = 64;
    private static final int i = 128;
    public static final int j = 1;
    public static final int k = 2;
    public static final int l = 2;
    int A;
    int B;
    String C;
    String D;
    int E;
    cls_c F;
    int m;
    cls_b n;
    String o;
    String p;
    HttpEntity q;
    com.nnee.p_fk.p_a.cls_c r;
    List s;
    List t;
    long u;
    int v;
    int w;
    int x;
    int y;
    String z;

    static 
    {
        a = 0;
    }
}
